<script>
import { routes } from '@/router.js';

const year = new Date().getFullYear();

export default {
  props: {
    headNav: {
      type: Array,
      default: () => {
        return [];
      },
    },
  },
  data() {
    return {
      year,
      routes,
    };
  },
};
</script>

<template>
  <footer class="dzq-footer">
    <div class="dzq-layout__box">
      <div class="dzq-footer__website">
        <div class="dzq-footer__list">
          <a v-for="item in routes" :key="item.name" :href="item.path">{{ item.alias }}</a>
          <a v-for="(item, index) in headNav" :key="index" :href="item.url">{{ item.text }}</a>
        </div>
        <div class="dzq-footer__website-Copyright">
          <span class="dzq-footer__website-time">Discuz! Team 2001-{{ year }}</span>
          <span class="dzq-footer__website-item">©</span>
          <span class="dzq-footer__website-cloud">腾讯云</span>
          粤B2-20090059-165
        </div>
      </div>
    </div>
  </footer>
</template>
